Option Explicit On 
Option Strict On

Imports System

Public Class TaxonClass
    Private sTaxonRankName As String = ""
    Private sTaxonRankValue As String = ""
    Private sApplicableCommonName As String = ""
    Private iChildren As Integer = 0 'counts number of children this node has
    Private iLevel As Integer = 0    'used to manipulate the indent in the list box

    Property RankName() As String
        Get
            RankName = sTaxonRankName
        End Get
        Set(ByVal Value As String)
            sTaxonRankName = Value
        End Set
    End Property

    Property RankValue() As String
        Get
            RankValue = sTaxonRankValue
        End Get
        Set(ByVal Value As String)
            sTaxonRankValue = Value
        End Set
    End Property

    Property CommonName() As String
        Get
            CommonName = sApplicableCommonName
        End Get
        Set(ByVal Value As String)
            sApplicableCommonName = Value
        End Set
    End Property

    Property Nchildren() As Integer
        Get
            Nchildren = iChildren
        End Get
        Set(ByVal Value As Integer)
            iChildren = Value
        End Set
    End Property

    Property Level() As Integer
        Get
            Level = iLevel
        End Get
        Set(ByVal Value As Integer)
            iLevel = Value
        End Set
    End Property

    Public Sub ChildInc()
        iChildren += 1
    End Sub
    Public Sub ChildDecr()
        iChildren -= 1
        If (iChildren < 0) Then
            MessageBox.Show("Number of children below zero", "Error adjusting taxa child count", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

End Class
